package org.example.cloudalibaba.service;

import org.example.springcloud.common.Result;
import org.example.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// feign远程接口调用的接口，使用PaymentFallbackService类作为降级服务
@FeignClient(value = "alibaba-payment-provider",fallback = PaymentFallbackService.class)
public interface PaymentService {
    @GetMapping("/payment/get/{id}")
    Result<Payment> paymentInfo(@PathVariable("id") Long id);
}
